<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="js/jBox-master/Source/plugins/Notice/jBox.Notice.css">
<link rel="stylesheet" href="js/jBox-master/Source/plugins/Confirm/jBox.Confirm.css">
<link rel="stylesheet" href="js/jBox-master/Source/plugins/Image/jBox.Image.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/NoticeFancy.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipBorder.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipBorderThick.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipDark.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipSmall.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipSmallGray.css">
<link rel="stylesheet" href="js/jBox-master/Source/themes/TooltipError.css">

<script type="text/javascript" src="js/common1.js"></script>
<script type="text/javascript" src="js/jBox-master/Source/plugins/Notice/jBox.Notice.min.js"></script>
<script type="text/javascript">
function sign(){
	$.ajax({
		url:'userSign.do',
		type:'post',
		dataType:'json',
		success:function(result){
			console.log(result);
			if(result){
				//$.jBox.tip("提示词");
				new jBox('Notice', {
					animation: 'flip',
				    content: '签到成功，积分加10，记得明天也要来哦',
				    color: 'blue'
				});
			}else{
				//$.jBox.tip("提示词");
				new jBox('Notice', {
					animation: 'flip',
				    content: '今天已经签到过了，明天再来吧',
				    color: 'red'
				});
			}
		}
	})
}

</script>
</head>
<body style="margin:15px;">
<div style="margin-left:200px;">
<span class="glyphicon glyphicon-user"></span> <button type="button" class="btn btn-info">个人中心</button>

<button type="button" class="btn btn-success" onclick="sign()" style="float:right; margin-right:250px;">签到</button>
<div style="float:right; margin-right:150px;">
<span>欢迎您：</span>
<img src="${user.photo}" alt="touxiang" class="img-circle" height="30px" width="30px;">
<span class="text-success">${user.uname}</span>
<a href="quitLogin.do" target="_top">退出登陆</a>
</div>
</div>

</body>
<script type="text/javascript">
</script>
</html>